package com.linkstec.util;

import java.util.ResourceBundle;

/**
 * 配置文件(flowjob.properties)中信息读取
 * 
 * @author linkage
 * 
 */
public class FlowjobConfigUtil {

	private final static ResourceBundle resouceBundle = ResourceBundle.getBundle("flowjob");

	/**
	 * 获取flowjob.properties中配置信息 不带默认值
	 * 
	 * @param key
	 * @return
	 */
	public static String getProperty(String key) {
		return getProperty(key, null);
	}

	/**
	 * 获取flowjob.properties中配置信息 带默认值
	 * 
	 * @param key
	 * @param defaultVal
	 * @return
	 */
	public static String getProperty(String key, String defaultVal) {
		return resouceBundle.getString(key) != null ? resouceBundle
				.getString(key) : defaultVal;
	}

}
